<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no,viewport-fit=cover" />
    <title>考评页面</title>
    <link rel="stylesheet" href="/addons/jquery-weui-build/css/weui.min.css">
    <link rel="stylesheet" href="/addons/jquery-weui-build/css/jquery-weui.css">
    <link rel="stylesheet" href="/css/system/main.css?v=2018050203">


    <style>
        body{
            background: #fff;
        }
    </style>
</head>
<body ontouchstart>
<div class="index-review">
    <div class="header-bk">
        <div class="con-head">
            <img @if(empty($user->logo)) src="../../images/system/ps1.png" @else src="{{url($user->logo)}}" @endif><span class="user-name">@if(!empty($user)){{$user->name}}@endif</span>
        </div>
    </div>
    <div class="echart-contain" style="width: 300px;height: 300px;margin: 0 auto;">
        <div id="part" style="width: 300px;height: 300px;">

        </div>
    </div>



    @if(!empty($detail))
        <div class="list-content">
            <div class="section-li">
                <span class="circle-span"></span>
                <p>绩效</p>
                <p class="score-list">
                    @if($detail->total_ach_score > 0)
                        {{$detail->totalscore+ $detail->achievement_score/$detail->total_ach_score*100}}
                    @else
                        {{$detail->totalscore}}
                    @endif
                </p>
                <span class="active"></span>
            </div>
            <div class="section-li" onclick="window.location.href='/user/performance/achievement?uid={{$user->id}}'">
                <span class="circle-span sec-circle"></span>
                <p>业绩完成</p>
                <p class="score-list">
                    @if($detail->total_ach_score > 0)
                        {{$detail->achievement_score/$detail->total_ach_score*100}}
                    @else
                        0
                    @endif
                </p>
                <span class="active"></span>
            </div>
            <div class="section-li" onclick="window.location.href='/user/performance/attendence?uid={{$user->id}}'">
                <span class="circle-span third-circle"></span>
                <p>考勤状况</p>
                <p class="score-list">-{{$detail->attendence_score}}</p>
                <span class="active"></span>
            </div>
            <div class="section-li" onclick="window.location.href='/user/performance/reward-punish?uid={{$user->id}}'">
                <span class="circle-span third-circle"></span>
                <p>奖励惩罚</p>
                <p class="score-list">{{$detail->reward_score + $detail->punish_score}}</p>
                <span class="active"></span>
            </div>
        </div>
    @endif
    {{--<div class="list-content">
        <div class="section-li">
            <span class="circle-span"></span>
            <p>绩效</p>
            <p class="score-list">100</p>
            <span class="active"></span>
        </div>
        <div class="section-li" onclick="window.location.href='/user/performance/achievement'">
            <span class="circle-span sec-circle"></span>
            <p>业绩完成</p>
            <p class="score-list">100</p>
            <span class="active"></span>
        </div>
        <div class="section-li" onclick="window.location.href='/user/performance/attendence'">
            <span class="circle-span third-circle"></span>
            <p>出勤状况</p>
            <p class="score-list">-3</p>
            <span class="active"></span>
        </div>
        <div class="section-li" onclick="window.location.href='/user/performance/reward-punish'">
            <span class="circle-span third-circle"></span>
            <p>奖励惩罚</p>
            <p class="score-list">-3</p>
            <span class="active"></span>
        </div>
    </div>--}}
</div>
@include('frontuser.caidan')
<script src="/js/jquery-2.1.4.min.js"></script>
<script src="/addons/jquery-weui-build/js/fastclick.js"></script>
<script src="{{asset('/industry/echarts.min.js')}}"></script>
<script>
    $(function() {
        document.documentElement.style.fontSize = document.documentElement.clientWidth / 7.5 + 'px';
        FastClick.attach(document.body);
    });
</script>
<script src="/addons/jquery-weui-build/js/jquery-weui.min.js"></script>
<script>
    $('.find-link').click(function () {
        $('.front-show-hidden').toggle()
    });
    /*var kjson =  [{value:10, name:'出勤率'},
            {value:5, name:'业绩'},
            {value:15, name:'合作'},
            {value:25, name:'团结'},
            {value:20, name:'勇敢'},
            {value:35, name:'善良'},];*/
    var kjson = {!! $chart !!};

    var myChart = echarts.init(document.getElementById('part'));
    option = {
        tooltip : {
            trigger: 'item',
            formatter: "{b} : {c} "
        },


        calculable : true,
        series : [
            {
                name:'面积模式',
                type:'pie',
                radius : [15, 100],
                center : ['50%', '70%'],
                roseType : 'area',
                data:kjson,
            },
            {
                name:'半径模式',
                type:'pie',
                radius : [60, 60],
                center : ['50%', '50%'],
                roseType : 'area',
                tooltip : {
                    trigger: 'item',
                    formatter: "及格线"
                },
                label: {
                    normal: {
                        show: false
                    },
                    emphasis: {
                        show: true
                    }
                },
                lableLine: {
                    normal: {
                        show: false
                    },
                    emphasis: {
                        show: true
                    }
                },
                itemStyle:{
                    borderColor: "#FF0000",
                    borderWidth: 2
                },
                data:[
                    {value:0},

                ],
            }
            ,
            {
                name:'半径模式',
                type:'pie',
                radius : [100, 100],
                center : ['50%', '50%'],
                roseType : 'area',
                tooltip : {
                    trigger: 'item',
                    formatter: "100"
                },
                label: {
                    normal: {
                        show: false
                    },
                    emphasis: {
                        show: true
                    }
                },
                lableLine: {
                    normal: {
                        show: false
                    },
                    emphasis: {
                        show: true
                    }
                },
                itemStyle:{
                    borderColor: "#00ff00",
                    borderWidth: 2
                },
                data:[
                    {value:100, name:'rose11'},

                ],
            }

        ]
    };
    myChart.setOption(option);
</script>
</body>
</html>